package com.dmgis.hndz.service.impl;


import com.dmgis.hndz.service.DangerSourceService;
import com.dmgis.hndz.mapper.DangerSourceMapperXml;
import com.dmgis.hndz.pojo.DangerSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/************************************
 *
 * @author : HuangDeYin Jolly
 * @since : JDK 11
 * @Date : 2023/7/8  星期六   15:26
 * @description : 此类用来
 ***************************************/
@Service
public class DangerSourceServiceImpl implements DangerSourceService {

    @Autowired
    private DangerSourceMapperXml dangerSourceMapperXml;





//    @Override
//    public Integer save(final List<DangerSource> dataList) {
//        List<Integer> result = new ArrayList<>();
//        dataList.forEach(dangerSource -> {
//            int insertSelective = this.dangerSourceMapperXml.insertSelective(dangerSource);
//            result.add(insertSelective);
//        });
//        if (result.contains(0)){
//            return -1;
//        }else {
//            return 1;
//        }
//
//    }

    @Override
    public List<DangerSource> list() {
        return dangerSourceMapperXml.getAllOrById(null);
    }
}
